/*google-fonts*/
 @import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.nav_image {
    display: flex;
    min-width: 55px;
    justify-content: center;
}
.nav_image img{
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 50%;
}
/* Pre css */
.flex{
    display: flex;
    align-items: center;
}
/* sidebar */
.sidebar {
    width: 300px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--md-sys-color-surface);
    padding: 10px 5px;
    box-sizing: border-box;
    transition: all 0.4s ease;
    border-radius: 0 15px 15px 0;
    font-family: Poppins;
    user-select: none;
}

.sidebar.close{
    width: calc(55px + 20px);
}

.logo_items{
    gap: 5px;
}
.logo_name{
    margin-left: 20px;
    font-size: 22px;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
}
.sidebar.close .logo_name, .sidebar.close #lock-icon, .sidebar.close #sidbar-close{
    opacity: 0;
    pointer-events: none;
}
#lock-icon,
#sidebar-close
{
    padding: 10px;
    color: #4070f4;
    font-size: 25px;
    cursor: pointer;
}

#sidebar-close{
    color: #333;
    display: none;
}

.menu_container{
    flex: 0 0 auto;
    margin-top: 0;
    overflow-y: visible;
    position: relative;
}

.learning-column,
.entertainment-column {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.chat_container{
    flex: 1;
    padding: 10px 0;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

.chat_container::-webkit-scrollbar{
    display: none;
}

.menu_title{
    position: relative;
    width: 55px;
    height: 50px;
}

.menu_title .title{
    margin-left: 15px;
}
.sidebar.close .title {
    opacity: 0;
}
.menu_title .line{
    position: absolute;
    left: 50%;
    width: 20px;
    height: 3px;
    transform: translateX(-50%);
    background-color: #aaa;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.menu_title .line {
    opacity: 0;
}
.sidebar.close .line{
    opacity: 1;
}

.item{
    height: 40px;
    list-style: none;
}

.link{
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: #707070;
    position: relative;
    border-radius: 16px;
    transition: background-color 0.5s, color 0.5s, border-bottom-color 0.5s, border-left-color 0.5s, border-right-color 0.5s, border-top-color 0.5s;
}

.link i{
    width: 50px;
    height: 40px;
    display: flex;
    font-size: 22px;
    justify-content: center;
    align-items: center;
}
.link span{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 120px;
}
.link:hover{
    background-color:var(--md-sys-color-surface-container);
    color: black;
}
.link.active{
    background-color:var(--md-sys-color-surface-container);
    color: black;
}
.bx.bxs-edit-alt i{
    width: 25px;
    height: 25px;
}
.bx.bxs-trash i{
    width: 25px;
    height: 25px;
}


.sidebar_profile{
    margin-top: 20px;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 0, 0, .1);
}

.sidebar_profile .name{
    font-size: 18px;
    line-height: 20px;
    color: #333;
}

.sidebar_profile .email{
    font-size: 15px;
    color: #333;
}

ul.menu_item {
    padding-left: 0rem;
}

ul.chat_item {
    padding-left: 0rem;
}

.add {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    border-radius: 16px;
    height: 40px;
    transition: background-color 0.5s, color 0.5s, border-bottom-color 0.5s, border-left-color 0.5s, border-right-color 0.5s, border-top-color 0.5s; /* add transition effect */
}

.add:hover {
    background-color: #4070f4;
    color: #fff;
    border-color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

/* 美化侧边栏样式 */
.left-content {
    width: 320px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Logo区域样式 */
.logo_items {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.nav_image {
    width: 35px;
    height: 35px;
    margin-right: 12px;
}

.nav_image img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.logo_name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* 分类标题样式 */
.column-header {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
}

.column-header:hover {
    background: #f0f2f5;
}

.column-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a73e8;
}

/* 新对话按钮样式 */
.add.link {
    margin: 10px 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(26, 115, 232, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.add.link:hover {
    background: linear-gradient(135deg, #1557b0, #0a3d8f);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
    color: #ffffff !important;
}

.add.link i {
    font-size: 22px;
    margin-right: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.add.link span {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 对话列表样式 */
.chat_item {
    padding: 0 10px;
    overflow-y: auto;
    height: auto;
    min-height: 0;
    max-height: 160px;
}

.chat_item .item {
    margin: 5px 15px;
    border-radius: 8px;
    transition: all 0.2s;
}

.chat_item .item .link {
    border-radius: 8px;
    transition: all 0.2s;
}

.chat_item .item .link:hover {
    background: #f0f2f5;
}

.chat_item .item .link.active {
    background: #e8f0fe;
    color: #1a73e8;
}

/* 图标样式 */
.bx {
    font-size: 18px;
}

.bxs-edit-alt,
.bxs-trash {
    opacity: 0;
    transition: opacity 0.2s;
}

.item:hover .bxs-edit-alt,
.item:hover .bxs-trash {
    opacity: 1;
}

/* 子分类样式 */
.learning-column-learn,
.entertainment-column-entertainment {
    padding: 10px 20px;
    margin: 5px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.learning-column-learn:hover,
.entertainment-column-entertainment:hover {
    background: #f0f2f5;
}

/* 对话列表容器样式 */
.chat_container {
    flex: 1;
    padding: 10px 0;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

/* 当内容较少时隐藏滚动条 */
.chat_item::-webkit-scrollbar {
    width: 5px;
    display: none;
}

/* 只有在内容超出时才显示滚动条 */
.chat_item:hover::-webkit-scrollbar {
    display: block;
}

.chat_item.scrollable::-webkit-scrollbar {
    display: block;
}

/* 滚动条轨道 */
.chat_item::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

/* 滚动条滑块 */
.chat_item::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 5px;
}

.chat_item::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.section-divider {
    height: 1px;
    background: #eee;
    margin: 10px 0;
}

/* 功能区域样式 */
.features-column {
    flex: 0 0 auto;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* 功能项样式 */
.feature-item {
    padding: 12px 20px;
    margin: 5px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.feature-item:hover {
    background: #f0f2f5;
}

.feature-item.active {
    background: #e8f0fe;
    color: #1a73e8;
}

.feature-item i {
    font-size: 20px;
    margin-right: 12px;
    color: #666;
}

.feature-item span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.feature-item:hover i,
.feature-item:hover span {
    color: #1a73e8;
}

/* 对话历史区域样式 */
.chat-history {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

/* AI工具按钮样式 */
.learning-column-learn {
    padding: 12px 20px;
    margin: 8px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: #f8f9fa;
    border: 1px solid #eee;
}

.learning-column-learn:hover {
    background: #f0f2f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.learning-column-learn.active {
    background: #e8f0fe;
    border-color: #1a73e8;
}

.learning-column-learn i {
    font-size: 20px;
    margin-right: 12px;
    color: #1a73e8;
    flex-shrink: 0;
}

.learning-column-learn span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.learning-column-learn:hover span {
    color: #1a73e8;
}

/* AI工具区域样式 */
.learning-column {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.learning-column .column-header {
    padding: 15px 20px;
    margin-bottom: 5px;
}

.learning-column .column-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #666;
    margin: 0;
}

